<!--
  运营-招聘管理-【招聘职位】
 -->
<template>
  <div class="news-container">
    <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
      <el-tab-pane label="学生留言" name="1">
        <StudentMsg ref="studentMsg" />
      </el-tab-pane>
      <el-tab-pane label="留言类型" name="2">
        <MsgType ref="msgType" />
      </el-tab-pane>
      <el-tab-pane label="回收站" name="3">
        <RecycleBin ref="recycleBin" />
      </el-tab-pane>
    </el-tabs>
  </div>
</template>

<script>
import { searchConfig, tableConfig } from './initData';
import StudentMsg from './studentMsg.vue';
import RecycleBin from './recycleBin.vue';
import MsgType from './msgType.vue';

export default {
  name: 'Company',
  components: {
    StudentMsg,
    RecycleBin,
    MsgType
  },
  data() {
    return {
      searchConfig,
      tableConfig,
      tableData: [
        {
          id: '01',
          title: '这是测试标题'
        }
      ],
      total: 0,
      page: 0,
      limit: 0,
      tableSelectList: [],
      activeName: '1'
    }
  },
  created() {
  },
  methods: {
    handleClick(data) {
      const refEnum = {
        "1": "studentMsg",
        "2": "msgType",
        "3": "recycleBin"
      }
      this.$refs[refEnum[this.activeName]] && this.$refs[refEnum[this.activeName]].handleSearch();
    }
  }
}
</script>

<style lang="scss" scoped>
  .news-container {
    
    .header {
      display: flex;
      justify-content: space-between;
    }
  }
</style>